package test_3_9;

//数组
public class one {
    public static void main(String[] args) {
        int []arry={1,2,3,4,5};
        String c=mytostring(arry);
        System.out.println(c);
    }
    public static  String mytostring(int arry[]) {
        if (arry == null) {
            return null;
        } else {
            String ret = "[";
            for (int i = 0; i < arry.length; i++) {
                ret += arry[i];
                if (i == arry.length - 1) {
                    break;
                }
                ret += ",";
            }
            ret += "]";
            return ret;
        }
    }
}
